<?php
global $_GPC, $_W;
$uniacid = $_W['uniacid'];
$id = $_GPC['id'];
$res = $this->res;
$plus = $this->plus;
load()->func('tpl');
$setting = $this->baseset($uniacid);
$settings = $this->module['config'];
$openid = $_W['openid'];
$userinfo = $this->Get_checkoauth();
if (empty($_W['openid'])) {
	$openid = $userinfo['openid'];
}
if ($setting['glopenid'] != $openid) {
	$aouthkey = 'error';
	message('非法访问', $this->createMobileUrl('index'), 'error');
	exit;
}
if ($setting['glopenid'] == $openid) {
	$aouthkey = $setting['nbkey'];
}
$follow = $userinfo['follow'];
$user = $this->getuserinfo($openid, $userinfo['nickname'], $userinfo['avatar'], $follow);
$allcate = pdo_fetchall("SELECT * FROM " . tablename($this->tablecate) . " WHERE uniacid = '{$_W['uniacid']} ' AND status=1");
$indexcate = pdo_fetchall("SELECT * FROM " . tablename($this->tablecate) . " WHERE uniacid = '{$_W['uniacid']} ' AND pic!=''");
$_share['title'] = $setting['fxtit'];
$_share['imgUrl'] = tomedia($setting['fxlogo']);
$_share['desc'] = $setting['fxdes'];
$_share['link'] = $_W['siteroot'] . "app/index.php?i=" . $_W['uniacid'] . "&c=entry&do=index&m=bsht_tbk";
$_W['page']['sitename'] = $setting['sitetitle'];
if (empty($_W['page']['sitename'])) {
	$pagename = '管理员面板';
} else {
	$pagename = '管理员面板';
}
include $this->template('admin');